package com.lagou.edu.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * 数据库连接池管理
 */
public class DruidUtils {
    private DruidUtils() {

    }
    private static DruidDataSource druidDataSource = new DruidDataSource();
    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql:///bank");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("root");
    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }
}
